package com.akaovi.pojo;

/**
 * @author akaovi
 * @version 1.0
 * @description
 * @date 2022/11/7 14:12
 * @since 2022/11/7 14:12
 */
public class SalariedEmployee extends Employee implements OthersPay{
    private double salary;

    public SalariedEmployee() {
    }

    public SalariedEmployee(String name, int birth, double salary){
        super(name, birth);
        this.salary = salary;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    /**
     * 加班费
     * @return 加班费
     */
    @Override
    public double overtimePay() {
        return 2000.0;
    }

    public double getSalary(int month){
        return salary + super.getSalary(month) + overtimePay();
    }
}

